package com.itzol.javablog.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itzol.javablog.config.Result;
import com.itzol.javablog.entity.Category;
import com.itzol.javablog.mapper.Categorymapper;
import com.itzol.javablog.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceimpl extends ServiceImpl<Categorymapper, Category> implements CategoryService {
    @Autowired
    private CategoryService service;
    @Override
    public boolean Addcalss(Category category) {
       boolean r= service.save(category);
       if (r){
           return true;
       }
       return false;
    }

    @Override
    public List<Category> selectcategory() {
      List<Category> categoryList = service.list(null);
      return categoryList;
    }
}
